import java.util.HashMap;

public class Caretaker {
    private HashMap<String,Memento> mementos;

    public Caretaker() {
        mementos = new HashMap<>();
    }

    public Memento getMemento(String name) {
        return mementos.get(name);
    }

    public void setMemento(String name,Memento memento) {
        mementos.put(name,memento);
    }
}
